﻿using PRO.Common;
using PRO.Config;
using PRO.User;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using PRO.Entity;
using PRO.Product;

namespace web.Products
{
    public partial class item : PageBase
    {
        protected bool error = false;
        protected int id = CVGRequest.GetQueryString("id").DEC_Decode(BaseConfigs.DEC_KEY).ToInt(0);
        protected ProductInfo info = new ProductInfo();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (id == 0)
            {
                error = true;
                ErrorControl.Msg = "非常抱歉，您访问的页面不存在！";
            }
            else
            {
                info = ProductLib.GetProductInfo(id);
                if (info.ID == 0)
                {
                    error = true;
                    ErrorControl.Msg = "非常抱歉，您访问的页面不存在！";
                }
            }
        }
    }
}